/**
 * Generate time : 2011-06-27 5:55:00
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cc.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCCBusinessRateDetail
 * 
 */
public class ZMCCBusinessRateDetail extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdClassifyId = " "; /* 分项ID */
	private String fdClassifyName = " "; /* 分项名称 */
	private String fdRateId = " "; /* 权重ID */
	private String fdRateName = " "; /* 权重名称 */
	private Float fdRate = new Float(0); /* 权重比 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdClassifyId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("分项ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdClassifyName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("分项名称");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdRateId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("权重ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRateName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("业务权重名称");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdRate");
		eiColumn.setType("N");
		eiColumn.setScaleLength(2);
		eiColumn.setFieldLength(4);
		eiColumn.setDescName("权重比");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCCBusinessRateDetail() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdClassifyId - 分项ID
	 * 
	 * @return the fdClassifyId
	 */
	public String getFdClassifyId() {
		return this.fdClassifyId;
	}

	/**
	 * set the fdClassifyId - 分项ID
	 */
	public void setFdClassifyId(String fdClassifyId) {
		this.fdClassifyId = fdClassifyId;
	}

	/**
	 * get the fdClassifyName - 分项名称
	 * 
	 * @return the fdClassifyName
	 */
	public String getFdClassifyName() {
		return this.fdClassifyName;
	}

	/**
	 * set the fdClassifyName - 分项名称
	 */
	public void setFdClassifyName(String fdClassifyName) {
		this.fdClassifyName = fdClassifyName;
	}
	
	/**
	 * get the fdRateId - 权重ID
	 * 
	 * @return the fdRateId
	 */
	public String getFdRateId() {
		return this.fdRateId;
	}

	/**
	 * set the fdRateId - 权重ID
	 */
	public void setFdRateId(String fdRateId) {
		this.fdRateId = fdRateId;
	}

	/**
	 * get the fdRateName - 业务权重名称
	 * 
	 * @return the fdRateName
	 */
	public String getFdRateName() {
		return this.fdRateName;
	}

	/**
	 * set the fdRateName - 业务权重名称
	 */
	public void setFdRateName(String fdRateName) {
		this.fdRateName = fdRateName;
	}
	
	/**
	 * get the fdRate - 权重比
	 * 
	 * @return the fdRate
	 */
	public Float getFdRate() {
		return this.fdRate;
	}

	/**
	 * set the fdRate - 权重比
	 */
	public void setFdRate(Float fdRate) {
		this.fdRate = fdRate;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdClassifyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdClassifyId")), fdClassifyId));
		setFdClassifyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdClassifyName")), fdClassifyName));
		setFdRateId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRateId")), fdRateId));
		setFdRateName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRateName")), fdRateName));
		setFdRate(NumberUtils.toFloat(StringUtils.toString(map.get("fdRate")), fdRate));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdClassifyId", StringUtils.toString(fdClassifyId, eiMetadata.getMeta("fdClassifyId")));
		map.put("fdClassifyName", StringUtils.toString(fdClassifyName, eiMetadata.getMeta("fdClassifyName")));
		map.put("fdRateId", StringUtils.toString(fdRateId, eiMetadata.getMeta("fdRateId")));
		map.put("fdRateName", StringUtils.toString(fdRateName, eiMetadata.getMeta("fdRateName")));
		map.put("fdRate", StringUtils.toString(fdRate, eiMetadata.getMeta("fdRate")));

		return map;

	}
}